import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { NewsPage } from './news.page';
import { HomePage } from '../home/home.page';
const routes: Routes = [
  {
    path: '',
    redirectTo: '/home/news/app/(home:show)',
    pathMatch: 'full'
  },
  {
    path: 'app',
    component: NewsPage,
    children: [
      {
        path: 'show',
        outlet: 'home',
        component: HomePage,
        data:[{type:1}]
      },
      {
        path: 'hot',
        outlet: 'hot',
        component: HomePage,
        data:[{type:2}]
      },
      {
        path: 'nominate',
        outlet: 'nominate',
        component: HomePage,
        data:[{type:3}]
      },
      {
        path: 'newest',
        outlet: 'newest',
        component: HomePage,
        data:[{type:4}]
      },
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class NewsRoutingModule {}
